import {defineStore} from "pinia";
// @ts-ignore
import cookie from 'js-cookie'

export const useStore = defineStore("token", {
    state: () => {
        return {
            token: '',
        }
    },
    getters: {},
    actions: {
        setToken(token: string) {
            this.token = token
            cookie.set("sysToken", token)
        }
    }
})